package com.smarthome.domain.ipc;

import java.io.Serializable;

public class IpcResponse<T> implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    private String threadId;// 工控机标识符
    private IpcCodeEnum ipcCodeObj;
    private T data;

    public String getCode() {
        return null == ipcCodeObj ? "ok" : ipcCodeObj.getCode();
    }

    public String getMsg() {
        return null == ipcCodeObj ? "" : ipcCodeObj.getMsg();
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public void setIpcCodeObj(IpcCodeEnum ipcCodeObj) {
        this.ipcCodeObj = ipcCodeObj;
    }

    public String getThreadId() {
        return threadId;
    }

    public void setThreadId(String threadId) {
        this.threadId = threadId;
    }

}
